import java.util.Scanner;
/*
public class If_Else {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n1 = sc.nextInt(), n2 =sc.nextInt();
        if (n1 > n2) {
            System.out.println("Махатма");
        }
        else {
            System.out.println("Джавахарлал");
        }
    }
}

public class If_Else {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(sc.nextLine().length() > sc.nextLine().length() ? "Махатма" : "Джавахарлал");
    }
}

public class If_Else {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(sc.nextLine().equals(sc.nextLine()) ? "Access is denied" : "Access is granted");
    }
}

public class If_Else {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n1 = sc.nextInt(), n2 = sc.nextInt(), n3 = sc.nextInt();
        if (n1 < n2) {
            if (n2 < n3) {
                System.out.println(n3);
            } else {
                System.out.println(n2);
            }
        } else
            System.out.println(n1);
    }

    public static void alternativeMath(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(Math.max(Math.max(sc.nextInt(), sc.nextInt()), sc.nextInt()));
    }

    public static void alternativeExelent(String[] args) {
        Scanner consol = new Scanner(System.in);
        int a = consol.nextInt(), b = consol.nextInt(), c = consol.nextInt();
        if (a < b) a = b;
        if (a < c) a = c;
        System.out.println(a);
    }
}
*/
class If_Else {
    public static void main(String[] args) {
        Scanner consol = new Scanner(System.in);
        int figures = consol.nextInt();
        System.out.println(3 <= figures & figures <= 5 ? "YES" : "NO");

    }

    public static void alternative(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println(("345".contains(sc.nextLine()) ? "YES" : "NO"));
    }

    public static void differenceOnSeven(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println((sc.nextInt() % 7 == 0 ? "YES" : "NO"));
    }

}